package com.example.yadmin.sys.mapper;

import com.example.yadmin.sys.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ag
 * @since 2023-10-09
 */
public interface UserMapper extends BaseMapper<User> {
    public List<String> getRoleNameByUserId(Integer userId);

    @Select("select id from y_user where username = #{username}")
    public Integer getUserIdByUsername(String username);
}
